import request from "@/plugins/request";

var pre = "";

if (process.env.NODE_ENV !== "development") {
  pre = "/api/sa/conv-access" + pre;
}

// 列表数据
export function pageForMyApproval(data) {
  return request({
    url: `${pre}/visitors/pageForMyApproval`,
    method: "post",
    data,
  });
}

// 审批
export function appove(data) {
  return request({
    url: `${pre}/visitors/appove`,
    method: "post",
    data,
  });
}

// 详情
export function getById(visitorsId) {
  return request({
    url: `${pre}/visitors/get?visitorsId=${visitorsId}`,
    method: "get",
  });
}

// 拜访我的
export function pageForMyVisitor(data) {
  return request({
    url: `${pre}/visitors/pageForMyVisitor`,
    method: "post",
    data,
  });
}